package com.swh.cloud.biz.provide.service;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.swh.cloud.biz.dao.IUserDao;
import com.swh.cloud.biz.service.IUserService;
import com.swh.user.domain.UserEntity;

/**
 * User业务处理类
 * @author sangwenhao-桑文豪
 * @date 2016年2月24日 下午10:51:28
 */
//@Service
@Transactional
public class UserProvideService {
	
	private IUserService userService ;

	public IUserService getUserService() {
		return userService;
	}

	public void setUserService(IUserService userService) {
		this.userService = userService;
	}

	public boolean save(UserEntity entity) {
		if(entity == null){
			return false ;
		}
		//to do something
		
		return userService.save(entity);
	}

	public boolean delete(String uuid) {
		//...
		return userService.delete(uuid);
	}

	public int update(UserEntity entity) {
		if(entity == null){
			return 0 ;
		}
		return userService.update(entity);
	}

	public UserEntity getById(Long id) {
		//...
		return userService.getById(id);
	}

	public List<UserEntity> getByIds(List<String> ids) {
		//...
		return userService.getByIds(ids);
	}

	public UserEntity queryByEntity(UserEntity entity) {
		//...
		return userService.queryByEntity(entity);
	}
	
	public List<UserEntity> getUserByUnion(Map<String, UserEntity> paraMap) {
		//...
		return userService.getUserByUnion(paraMap);
	}
}
